home *** CD-ROM | disk | FTP | other *** search
/ Aminet 40 / Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso / Aminet / dev / lang / Python16_Src.lha / Python16_Source / Include / import.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-10  |  1.7 KB  |  51 lines

  1. #ifndef Py_IMPORT_H
  2. #define Py_IMPORT_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6.  
  7. /* Module definition and import interface */
  8.  
  9. DL_IMPORT(long) PyImport_GetMagicNumber Py_PROTO((void));
  10. DL_IMPORT(PyObject *) PyImport_ExecCodeModule Py_PROTO((char *name, PyObject *co));
  11. DL_IMPORT(PyObject *) PyImport_ExecCodeModuleEx Py_PROTO((
  12.     char *name, PyObject *co, char *pathname));
  13. DL_IMPORT(PyObject *) PyImport_GetModuleDict Py_PROTO((void));
  14. DL_IMPORT(PyObject *) PyImport_AddModule Py_PROTO((char *name));
  15. DL_IMPORT(PyObject *) PyImport_ImportModule Py_PROTO((char *name));
  16. DL_IMPORT(PyObject *) PyImport_ImportModuleEx Py_PROTO((
  17.     char *name, PyObject *globals, PyObject *locals, PyObject *fromlist));
  18. DL_IMPORT(PyObject *) PyImport_Import Py_PROTO((PyObject *name));
  19. DL_IMPORT(PyObject *) PyImport_ReloadModule Py_PROTO((PyObject *m));
  20. DL_IMPORT(void) PyImport_Cleanup Py_PROTO((void));
  21. DL_IMPORT(int) PyImport_ImportFrozenModule Py_PROTO((char *));
  22.  
  23. extern DL_IMPORT(PyObject *)_PyImport_FindExtension Py_PROTO((char *, char *));
  24. extern DL_IMPORT(PyObject *)_PyImport_FixupExtension Py_PROTO((char *, char *));
  25.  
  26. struct _inittab {
  27.     char *name;
  28.     void (*initfunc) Py_PROTO((void));
  29. };
  30.  
  31. extern DL_IMPORT(struct _inittab *) PyImport_Inittab;
  32.  
  33. extern DL_IMPORT(int) PyImport_AppendInittab Py_PROTO((char *name, void (*initfunc)()));
  34. extern DL_IMPORT(int) PyImport_ExtendInittab Py_PROTO((struct _inittab *newtab));
  35.  
  36. struct _frozen {
  37.     char *name;
  38.     unsigned char *code;
  39.     int size;
  40. };
  41.  
  42. /* Embedding apps may change this pointer to point to their favorite
  43.    collection of frozen modules: */
  44.  
  45. extern DL_IMPORT(struct _frozen *) PyImport_FrozenModules;
  46.  
  47. #ifdef __cplusplus
  48. }
  49. #endif
  50. #endif /* !Py_IMPORT_H */
  51.